package com.bigknow.appstore.web.base.service.impl;

import com.bigknow.appstore.web.framework.service.BaseCRUDService;
import com.bigknow.appstore.web.base.dao.IRoleDao;
import com.bigknow.appstore.web.base.entity.Role;
import com.bigknow.appstore.web.base.service.IRoleService;
import org.springframework.stereotype.Service;

/**
 * Created by TwelveFoldEr on 2016/3/14.
 */
@Service
public class RoleService extends BaseCRUDService<Role, IRoleDao> implements IRoleService {

    @Override
    public int save(Role entity) {
        entity.setPermissionIds(clearUpIds(entity.getPermissionIds()));
        return super.save(entity);
    }
}
